package boot.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResponseResult implements Serializable {
    private String responseCode;
    private String message;
    private Object returnObject;

    public static final String SUCCESS="200";
    public static final String FAIL="500";


    public static ResponseResult success(){
        return success("OK");
    }
    public static ResponseResult success(String message){
        return success(message,null);
    }
    public static ResponseResult success(String message,Object returnObject){
        return new ResponseResult(SUCCESS,message,returnObject);
    }
    public static ResponseResult success(Object returnObject){
        return success("OK",returnObject);
    }


}
